<?php
$this->breadcrumbs=array(
	'Events'=>array('index'),
	$model->name,
);

$this->menu=array(
	array('label'=>'List Event', 'url'=>array('index')),
	array('label'=>'Create Event', 'url'=>array('create')),
	array('label'=>'Update Event', 'url'=>array('update', 'id'=>$model->id)),
	array('label'=>'Delete Event', 'url'=>'#', 'linkOptions'=>array('submit'=>array('delete','id'=>$model->id),'confirm'=>'Are you sure you want to delete this item?')),
	array('label'=>'Manage Event', 'url'=>array('admin')),
);
?>

<h1>View Event #<?php echo $model->id; ?></h1>

<?php $this->widget('zii.widgets.CDetailView', array(
	'data'=>$model,
	'attributes'=>array(
		'id',
		'name',
		'time',
		'place',
		array(
            'name'=>'id_type',
            'value'=>CHtml::encode($model->idType->name),
        ),
	),
)); ?>

<div id="comment">
    <?php if ($model->commentCount >= 1):?>
    <h3>
       
        <?php echo $model->commentCount > 1 ? $model->commentCount.' comments' : 'One comment' ;?>
    </h3>
    
    <?php 
        $this->renderPartial('_comments', array('comments'=>$model->comments));
        ?>
    
    <? endif;?>
    
    <h3>Leave a Comment</h3>
    
    <?php if (Yii::app()->user->hasFlash('commentSubmitted')):?>
    
    <div class="flash-success">
        <?php echo Yii::app()->user->getFlash('commentSubmitted');?>
    </div>
    
    <?php else: ?>
    
        <?php $this->renderPartial('/comment/_form', array('model'=>$comment));?>
        
    <?php endif;?>
</div>